package com.wego.service;

import com.wego.service.base.BaseService;
import com.wego.common.bean.PageBean;
import com.wego.entity.domain.Order;
import com.wego.entity.query.OrderQuery;

/**
 * 订单服务接口
 *  @author hc
 */
public interface OrderService extends BaseService<Order> {

    /**
     * 分页查找
     *
     * @param orderQuery
     * @return
     */
    PageBean<Order> selectPage(OrderQuery orderQuery);

    /**
     * 生成订单
     * @param goodsId
     * @param amount
     * @param payMethodId
     * @param addressId
     * @param userId
     * @return 生成订单的同时，删除购物车中已经购买的商品
     */
    boolean genOrder(Long[] goodsId, Integer[] amount, Integer payMethodId, Long addressId, Long userId);
}

